import request from "@/request/ajax.js";
let ztpmTenant =
  import.meta.env.VITE_API_URL +
  import.meta.env.VITE_API_ALIAS +
  import.meta.env.VITE_API_TENANT;
let ztpmSys =
  import.meta.env.VITE_API_URL +
  import.meta.env.VITE_API_ALIAS +
  import.meta.env.VITE_API_ZTPMSYS;

// 获取账户信息
export const apiGetUserInfo = (params, msg) => {
  return request.get(ztpmTenant + "/account/current", params, msg);
};
// 获取用户详情
export const apiGetUserDetail = (params, msg) => {
  return request.get(ztpmTenant + "/user/detail", params, msg);
};

// 获取部门列表树
export const apiGetDepartmentTree = (params, msg) => {
  return request.get(ztpmTenant + "/department/tree", params, msg);
};
// 获取角色列表
export const apiGetRoleList = (params, msg) => {
  return request.get(ztpmTenant + "/role/page", params, msg);
};

// 获取已有的用户角色
export const apiGetUserRole = (params, msg) => {
  return request.get(ztpmTenant + "/user/selected/roles", params, msg);
};

// 获取菜单树数据
export const apiGetMenuTree = (params, msg) => {
  return request.get(ztpmTenant + "/scert/catalog/menu/tree", params, msg);
};
